# -*- coding: utf-8 -*-

# Copyright (c) Huoty, All rights reserved
# Author: Huoty <sudohuoty@163.com>
# CreateTime: 2020-10-30 17:50:32

import time
import threading


def worker():
    while 1:
        print("-" * 10, threading.currentThread().ident)
        time.sleep(0.2)


th1 = threading.Thread(target=worker)
th2 = threading.Thread(target=worker)
th3 = threading.Thread(target=worker)

th1.daemon = th2.daemon = th3.daemon = True

th1.start()
th2.start()
th3.start()

print(th1.daemon, th2.daemon, th3.daemon)

#th1.join()
#th2.join()
#th3.join()

time.sleep(2)
